/*
 * Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.edu.cugb.xvideoplayer.activity;

import cn.edu.cugb.xvideoplayer.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainAcitivity extends Activity {
    private Button mlocalvideo_protrait;
    private Button mstreamvideo;
    private Button mYoutubeLayout;
    private static final String MEDIA = "media";
    private static final int LOCAL_VIDEO = 4;
    private static final int STREAM_VIDEO = 5;
    @Override
    protected void onCreate(Bundle icicle) {
        // TODO Auto-generated method stub
        super.onCreate(icicle);
        setContentView(R.layout.main);
        mlocalvideo_protrait = (Button) findViewById(R.id.localvideo_protrait);
        mlocalvideo_protrait.setOnClickListener(mLocalVideoListenerProtrait);

        mstreamvideo = (Button) findViewById(R.id.streamvideo);
        mstreamvideo.setOnClickListener(mYouTubeLayoutListener);
        
        mYoutubeLayout = (Button) findViewById(R.id.youtube);
        mYoutubeLayout.setOnClickListener(mYouTubeVideoListener);
    }
    
    private OnClickListener mLocalVideoListenerProtrait = new OnClickListener() {
        public void onClick(View v) {
            Intent intent =
                    new Intent(MainAcitivity.this,
                            MediaPlayerVideoProtrait.class);
            startActivity(intent);

        }
    };
    
    private OnClickListener mYouTubeVideoListener = new OnClickListener() {
        public void onClick(View v) {
            Intent intent =
                    new Intent(MainAcitivity.this,
                    		YoutubeVideoActivity.class);
            startActivity(intent);

        }
    };
      
    private OnClickListener mYouTubeLayoutListener = new OnClickListener() {
        public void onClick(View v) {
            Intent intent =
                    new Intent(MainAcitivity.this,
                    		YouTubeLayoutActivity.class);
            startActivity(intent);

        }
    };
    
}
